package edu.usc.csci578.model;

public class ClusterEdge {
	public static final boolean EDGE_IN_CLUSTER = true;
	public static final boolean EDGE_OUT_CLUSTER = false;

	private Cluster src;
	private Cluster tgt;

	public ClusterEdge(Cluster src, Cluster tgt) {
		super();
		this.src = src;
		this.tgt = tgt;
		src.add(this, EDGE_OUT_CLUSTER);
		tgt.add(this, EDGE_IN_CLUSTER);
	}

	public Cluster getSrc() {
		return src;
	}

	public Cluster getTgt() {
		return tgt;
	}

	public boolean isSelfRef() {
		return src == tgt;
	}

	public boolean contains(Cluster c) {
		return c == src || c == tgt;
	}
}
